home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: *** Need help ASAP *** CLS, LOCATE, etc do not work with Borland 3.1 for dos
- Date: 2 Mar 1996 09:01 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <2MAR199609010170@erich.triumf.ca>
- References: <4h96ne$3nb@fountain.mindlink.net>
- NNTP-Posting-Host: erich.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4h96ne$3nb@fountain.mindlink.net>, mike_huwe@mindlink.bc.ca (Mike Huwe) writes...
- >I am using Borland C++ 3.1. When I run simple programs that clear the
- >screen or use the LOCATE command, they don't work. for example,
- >When I run a program the output stays at the top of the screen. When I run
- >the program again the new output is shown below the old output.
- >
- >If I use the LOCATE macro, the statements are printed below
- >each other rather than at the specified cursor location.
-
- >I used the following:
- >
- >#define CLS printf("\033[2j")
- >#define LOCATE(r,c) printf("\033[%d;%dH",r,c)
-
- These macros _maybe_ require that you have ANSI.SYS loaded - I think they will
- work on a VT-100 terminal in ANSI mode....
-
- Borland provides the clrscr() and gotoxy() functions to do these tasks - they
- don't require ANSI.SYS, or any other special external programs. You do need to
- #include <conio.h> to use them.
-
- Note that _any_ special display operations such as this are compiler- or
- OS-specific. Microsoft will provide similar functions, but likely uses
- different names.
-
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
-
-
-
-
-
-
-
-